<template>
    <div class="flowerKnowledge-display">
      <div class="flowerKnowledge-list">
        <el-card :key="flowerKnowledge.id" class="flowerKnowledge-card" v-for="flowerKnowledge in flowerKnowledges">
          <img :src="flowerKnowledge.image" class="flowerKnowledge-image" alt="flowerKnowledge Image">
          <div class="flowerKnowledge-info">
            <p class="flowerKnowledge-name">{{ flowerKnowledge.name }}</p>
            <el-button class="flowerKnowledge-button" >查看详情></el-button>
          </div>
        </el-card>
      </div>
    </div>
  </template>
  
  <script>
  
  export default {
    name: 'flowerKnowledgeDisplay',
    props: {
    flowerKnowledges: {
      type: Array,
      default: () => ([
        {
          id: '',
          name: '',
          image: '',
        },
      ]),
    },
  },
  };
  </script>
  
  <style scoped>
  .flowerKnowledge-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 20px;
}
  .flowerKnowledge-display {
    width: 1200px;
    margin: 0 auto;
  }
  
  .flowerKnowledge-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
  }
  
  .flowerKnowledge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
    
  }
  
  .flowerKnowledge-image {
    width: 200px;
    height: 130px;
    object-fit: cover;
  }
  
  .flowerKnowledge-info {
    margin-top: 10px;
  }

  .flowerKnowledge-name {
    font-size: 18px;
    margin-bottom: 5px;
  }
  
  .flowerKnowledge-button {
    margin-top: 10px;
    margin-left: 58%;
    border: none;
    font-size: 12px;
  }
  </style>
  